/**
 * Created by linxiao on 2016/8/18.
 */
function Select(ui) {
    this.ui = ui;
    this.domReady();
};
Select.prototype.domReady = function () {
    var ui =  this.ui;
    $('[name=login_submit]',ui).click(function () {
        var username  = $('[name=username]',ui).val();
        var pwd = $('[name=pwd]',ui).val();
        $.ajax({
            url: HOST+"index/Login/loginIn",
            data:{
                username: username,
                pwd: pwd
            },
            type:'POST',
            dataType:'json',
            success: function(response){
                if(!response.isSuccess)
                {
                    var err_code = response.err_code;
                    var err_info = response.err_info;
                }else{
                    window.location.replace(HOST+"index/index/topicSelect")
                }
            }
        });
    });

}
